﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;

namespace RN.ERP.Entity
{
    public class ADSessionKey
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public Int32 ID { get; set; }
        /// <summary>
        /// 关联的用户ID
        /// </summary>
        public Guid UserID { get; set; }
        /// <summary>
        /// 证书ID
        /// </summary>
        public Guid? CertID { get; set; }
        /// <summary>
        /// 通讯随机值
        /// </summary>
        public Guid? Rnd { get; set; }
        /// <summary>
        /// AES Key
        /// </summary>
        public Byte[] TempKey { get; set; }
        /// <summary>
        /// AES IV
        /// </summary>
        public Byte[] TempIV { get; set; }
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:yyyy-MM-dd}")]
        public DateTime? AddTime { get; set; }
        /// <summary>
        /// 最后操作时间
        /// </summary>
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:yyyy-MM-dd}")]
        public DateTime? OpTime { get; set; }
        /// <summary>
        /// 用户IP
        /// </summary>
        public String UserIP { get; set; }
        /// <summary>
        /// Session状态 0-未验证 9-完成验证
        /// </summary>
        public Byte? Status { get; set; }
    }
}
